import React, {memo}  from "react";
import type {FC,ReactNode} from "react";

import { AreaHeaderWrapper } from "./style";

interface IProps {
    children?:ReactNode,
    title:string,
    moreText?:string,
    moreLink?:string
}

const AreaHeaderV2:FC<IProps> = (props)=>{
    const { title = '默认标题', moreText, moreLink } = props;
    return (
        <AreaHeaderWrapper>
            <h3 className="title">{title}</h3>
            {moreText && moreLink && <a href={moreLink}>{moreText}</a>}
        </AreaHeaderWrapper>
    )
}

export default memo(AreaHeaderV2);
